#include <iostream>
#include <vector>
#include "rbtree.hpp"
void RBTreeTest()
{
    Aurora::RBTree<int> rb;
    std::vector<int> v = {15, 83, 42, 67, 91, 5, 28, 74, 53, 36};
    for(const auto &e : v)
    {
        rb.Insert(e);
    }
    std::cout << "最小的数为:" << rb.LeftMost()->_data << std::endl;
    std::cout << "最大的数为:" << rb.RightMost()->_data << std::endl;
    std::cout << "是否为红黑树:" << rb.IsValidRBTRee() << std::endl;
    Aurora::RBTreeNode<int>* f = rb.Find(142);
    std::cout << "是否找到:" << (f == nullptr ? 0 : 1) << std::endl; 
    // std::cout << rb._pHead->_pLeft->_data << std::endl;
    // std::cout << rb._pHead->_pRight->_data << std::endl;
}
int main()
{
    RBTreeTest();
    return 0;
}